package com.sky.mapper;

import com.sky.entity.DishFlavor;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FlavorMapper {

    /**
     * 添加口味
     * @param flavors
     */
    void insert(List<DishFlavor> flavors);

    /**
     * 删除菜品对应口味
     * @param dishIds
     */
    void deleteFlavorByDishIds(List<Long> dishIds);

    /**
     * 查询菜品口味
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{id};")
    List<DishFlavor> selectByDishId(Long id);


}
